package com.axample.adapter;


import java.util.ArrayList;

import com.example.agenda.R;
import com.example.vo.Agenda;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class ListaAdapter extends BaseAdapter{

	private Context mContext;
	private LayoutInflater mInflater;
	private ArrayList<Agenda> mAgenda;
	
	public ListaAdapter(Context ctx,ArrayList<Agenda> agenda){
		mContext = ctx;
		mAgenda = agenda;
		mInflater = LayoutInflater.from(ctx);
	}
	
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return mAgenda.size();
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {

		View view = convertView;
		view = mInflater.inflate(R.layout.item_lista,null);
		
		TextView txtView = (TextView)view.findViewById(R.id.txtView);
		txtView.setText(mAgenda.get(position).getPrimeiroNome());
		
		return view;
	}
	
	public int[] getSelectItens(){
		
		return null;
	}
}
